﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XrmLibrary.MsCrm4Adapter.Extensions
{
    public static class CrmLabelExtensions
    {
        public static Microsoft.Xrm.Sdk.Label ToCrm2011Label(this Microsoft.Crm.Sdk.CrmLabel crm4Label)
        {
            Microsoft.Xrm.Sdk.Label crm2011Label =
                new Microsoft.Xrm.Sdk.Label
                (crm4Label.UserLocLabel.ToCrm2011LocalizedLabel(), crm4Label.LocLabels.ToCrm2011LocalizedLabelCollection().ToArray());

            return crm2011Label;
        }
    }
}
